package com.pikaqiu.warehouse.domain.req;

import com.pikaqiu.warehouse.domain.entity.Customer;
import com.pikaqiu.warehouse.domain.entity.Employee;
import com.pikaqiu.warehouse.domain.entity.Supplier;
import lombok.Data;

/**
 * @Author: Administrator
 * @Date: 2024/8/16
 */
@Data
public class SpecialUserForm {

    private Integer id;
    private String name;
    private String linkPhone;
    private String linkUser;
    private String linkAddress;
    private Integer status;
    private String image;

    public Employee toEmployee() {
        Employee employee = new Employee();
        employee.setId(this.id);
        employee.setName(this.name);
        employee.setLinkPhone(this.linkPhone);
        employee.setLinkUser(this.linkUser);
        employee.setLinkAddress(this.linkAddress);
        employee.setStatus(this.status);
        employee.setImage(this.image);
        return employee;
    }

    public Customer toCustomer() {
        Customer customer = new Customer();
        customer.setId(this.id);
        customer.setName(this.name);
        customer.setLinkPhone(this.linkPhone);
        customer.setLinkUser(this.linkUser);
        customer.setLinkAddress(this.linkAddress);
        customer.setStatus(this.status);
        customer.setImage(this.image);
        return customer;
    }

    public Supplier toSupplier() {
        Supplier supplier = new Supplier();
        supplier.setId(this.id);
        supplier.setName(this.name);
        supplier.setLinkPhone(this.linkPhone);
        supplier.setLinkUser(this.linkUser);
        supplier.setLinkAddress(this.linkAddress);
        supplier.setStatus(this.status);
        supplier.setImage(this.image);
        return supplier;
    }
}
